package wsz.code.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import wsz.api.CodeService;

/**
 * @author wsz
 * @date 2022/1/5 14:11
 **/
@RestController
@RequestMapping("code")
public class CodeController {

    @Reference
    private CodeService codeService;

    @GetMapping(value = "create/{email}")
    public boolean create(@PathVariable(name = "email") String email) {
        return codeService.create(email);
    }
}
